#pragma once
#include <Rz/IObject.h>
#include <Rz/EnumFlags.h>
#include "IStream.h"
#include "IStreamLineOperations.h"

namespace Rz { namespace IO {

class ConsoleStream :
	virtual public IObject,
	virtual public IStream,
	virtual public IStreamLineOperations
{
	public:
		RZ_RTTI(Rz::IO, ConsoleStream);
		RZ_RTTI_IMPLEMENTS(IObject, IStream, IStreamLineOperations);
		RZ_RTTI_END;

		virtual size_t Read(byte_t* buffer, size_t size) const override;
		virtual String ReadLine() const override;
		virtual void Write(const byte_t* buffer, size_t size) override;
		virtual void WriteLine(const String& str) override;

		virtual void Seek(size_t position) override;
		virtual size_t GetPosition() const override;
		virtual size_t GetLength() const override;

		virtual bool IsOpened() const override;

		virtual bool CanSeek() const override;
		virtual bool CanRead() const override;
		virtual bool CanWrite() const override;

		virtual void Close() override;
};

} }
